# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Evgeniy Alekseev <arcanis at archlinux dot org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Simo Leone <neotuli@gmail.com>

pkgname=t1utils
pkgver=1.42
pkgrel=2
pkgdesc="Utilities for manupulating Adobe Type 1 font software "
arch=(loong64 x86_64)
url="https://github.com/kohler/t1utils"
license=(custom)
depends=(glibc)
source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
sha512sums=('29e983a488a0c51e31fe45572d66cfa8a987d85b32f303873c35d0551db29c09d424eb10e76374f908ef62bc7c60236231bbddf40eb60f1be9652322da4b1f5e')
b2sums=('5aabd8a559c79b8c4ee0711ce679dc8a6a091a7606261da7533b16b65295c0c12c0c77ac8f921a36a608e91584f90722c439127feeecde2480e6304428e7e6c0')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -fiv
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  make DESTDIR="$pkgdir" install -C $pkgname-$pkgver

  install -vDm 644 $pkgname-$pkgver/{NEWS,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"
  install -vDm 644 $pkgname-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}

